Skip to content

upserts: offer guidance when :replace_all or :replace_all_except produce an empty-list of fields to replace#4623

Merged
josevalim merged 1 commit into
elixir-ecto:masterfrom
milmazz:milton/offer-user-guidance
Jun 20, 2025
Merged

upserts: offer guidance when :replace_all or :replace_all_except produce an empty-list of fields to replace#4623
josevalim merged 1 commit into
elixir-ecto:masterfrom
milmazz:milton/offer-user-guidance

Conversation

@milmazz

@milmazz milmazz commented Jun 20, 2025

Copy link
Copy Markdown
Contributor

Offer some guidance to users when they upsert records with the :replace_all or :replace_all_except options, and the resulting list of fields to update is empty.

Please keep in mind that an empty list of fields to replace will produce an SQL Syntax error, as noted in elixir-ecto/ecto_sql#674, so we're proactively offering some advice to the users.

…produce an empty-list of fields to replace
@josevalim
josevalim merged commit db12e07 into elixir-ecto:master Jun 20, 2025
7 checks passed
@josevalim

Copy link
Copy Markdown
Member

💚 💙 💜 💛 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants